package draftProjects;

import java.util.ArrayList;
import java.util.Date;

public class Table {
	
    private Date crawlDate;
	private ArrayList<Raw> listRaw;
	
    public Table(Date CrawlDate)
    {
		this.setCrawlDate(CrawlDate);
		listRaw = new ArrayList<Raw>();
    }

	public void setCrawlDate(Date crawlDate) {
		this.crawlDate = crawlDate;
	}

	public Date getCrawlDate() {
		return crawlDate;
	}
	
	public void AddRaw(Raw raw)
	{
		if(raw != null) 
		{
			raw.setCrawlDate(crawlDate);
			listRaw.add(raw);
		}
	}

	public Raw GetRaw(int index)
	{
		Raw result = null;
		if(index >= 0 && index < listRaw.size()) result = listRaw.get(index);
		return result;
	}
	
	public int GetRawCount()
	{
		return listRaw.size();
	}

}
